package ioc;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");

        SequenceGenerator generatorByProperty = (SequenceGenerator) context.getBean("sequenceGeneratorByProperty");
        SequenceGenerator generatorByConstructor = (SequenceGenerator) context.getBean("sequenceGeneratorByConstructor");

        System.out.println("generatorByProperty.getSequence=" + generatorByProperty.getSequence());
        System.out.println("generatorByConstructor.getSequence=" + generatorByConstructor.getSequence());
    }
}
